package demo6;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * 演示bean的生命周期
 */
public class OrderTest {

    @Test
    public void test() {
        ApplicationContext context = new ClassPathXmlApplicationContext("bean6.xml");
        Order o = context.getBean("order", Order.class);

        ((ClassPathXmlApplicationContext)context).close();
    }
}
